import http from '../request.js'

// 护士管理控制类
/* 
查询护士详情*/

export function selectNurseInfo(data) {
  return http.request({
    url: '/admin/management/nurse/selectNurseInfo?id=' + data,
    method: 'get'
  })
}

/* 
查询护士列表*/

export function selectAllNurse(data) {
  return http.request({
    url: '/admin/management/nurse/selectAllNurse',
    method: 'post',
    data
  })
}

/* 
分页查询护士关联的订单*/

export function selectOrderByNurseId(data) {
  return http.request({
    url: '/admin/management/nurse/selectOrderByNurseId',
    method: 'post',
    data
  })
}

/* 
根据护士id查询紧急联系人*/

export function selectAllUrgencyLinkman(data) {
  return http.request({
    url: '/admin/management/nurse/selectAllUrgencyLinkman?nurseId=' + data,
    method: 'get'
  })
}

/* 
修改护士信息*/

export function updateNurse(data) {
  return http.request({
    url: '/admin/management/nurse/updateNurse',
    method: 'post',
    data
  })
}

// 用户管理控制类
// 查询所有用户 * /
export function selectAllUser(data) {
  return http.request({
    url: '/admin/management/user/selectAllUser',
    method: 'post',
    data
  })
}

export function getUserExcel(data) {
  return http.request({
    url: '/admin/management/user/getExcel',
    method: 'post',
    data
  })
}
/* 
查询单个用户详情*/

export function selectUserInfo(data) {
  return http.request({
    url: '/admin/management/user/selectUserInfo?userId=' + data,
    method: 'get'
  })
}
/* 
所有健康档案查看*/

export function selectAllHealthFile(data) {
  return http.request({
    url: '/admin/management/user/selectAllHealthFile?userId=' + data,
    method: 'get'
  })
}
/* 
某个健康档案查看*/
export function selectOneHealthFile(data) {
  return http.request({
    url: '/admin/management/user/selectOneHealthFile',
    method: 'get',
    data
  })
}
/* 
分页查询用户的订单*/
export function selectOrderByUserId(data) {
  return http.request({
    url: '/admin/management/user/selectOrderByUserId',
    method: 'post',
    data
  })
}
/* 
查询用户关联的地址*/

export function selectUserAddress(data) {
  return http.request({
    url: '/admin/management/user/selectUserAddress?userId=' + data,
    method: 'get'
  })
}
/* 
修改用户信息*/

export function updateUser(data) {
  return http.request({
    url: '/admin/management/user/updateUser',
    method: 'post',
    data
  })
}
export function selectAllNurseExport(data) {
  return http.request({
    url: '/admin/management/nurse/selectAllNurseExport',
    method: 'post',
    data
  })
}
export function selectAllUserExport(data) {
  return http.request({
    url: '/admin/management/user//selectAllUserExport',
    method: 'post',
    data
  })
}

export function selectLoginRecord(data) {
  return http.request({
    url: '/admin/loginRecord/selectLoginRecord',
    method: 'get',
    params: data
  })
}

export function disableNurse(params) {
  return http.request({
    url: '/admin/management/nurse/disableNurse',
    method: 'get',
    params
  })
}

export function selectAllNurseIds(data) {
  return http.request({
    url: '/admin/management/nurse/selectAllNurseIds',
    method: 'post',
    data
  })
}

export function selectAllUserIds(data) {
  return http.request({
    url: '/admin/management/user/selectAllUserIds',
    method: 'post',
    data
  })
}
